window.addEventListener('load',function() {
    var lunbo = document.querySelector('.lunbo');
    var tupian = document.querySelector('.tupian');
    var dian = document.querySelector('.dian');
    tupian.style.width = tupian.children.length*10+'rem';
    var shu = 0;
    var jishiqi = setInterval(function() {
        if(shu >= tupian.children.length-1) {
            shu = 0;
        }
        shu++;
        tupian.style.transition = 'all 1s';
        tupian.style.transform = 'translateX('+(-shu*lunbo.offsetWidth)+'px)';
    },2000);
})